Skip to content

Prevent duplicate suggestions when using @theme and @utility together #17675

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 9, 2025

Conversation

thecrypticace
Copy link
Contributor

Fixes tailwindlabs/tailwindcss-intellisense#1313

Right now given this CSS:

@theme reference {
  --text-header: 1.5rem;
}

@utility text-header {
  text-transform: uppercase;
}

You'll see two entries for text-header in IntelliSense completions but we only want you to see one. This PR solves this by merging their modifier lists and de-duping by class name.

@thecrypticace thecrypticace force-pushed the fix/dupe-utility-suggestions branch from 7bd0709 to 57300d5 Compare May 9, 2025 17:38
@thecrypticace thecrypticace marked this pull request as ready for review May 9, 2025 17:43
@thecrypticace thecrypticace requested a review from a team as a code owner May 9, 2025 17:43
@thecrypticace thecrypticace enabled auto-merge (squash) May 9, 2025 20:09
@thecrypticace thecrypticace merged commit f0986ce into main May 9, 2025
7 checks passed
@thecrypticace thecrypticace deleted the fix/dupe-utility-suggestions branch May 9, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate suggestion appears when a class is declared using @theme and then extended with a weaker @utility
2 participants